package com.feeyo.location.common

import android.app.Application
import com.amap.api.location.AMapLocationClient
import com.blankj.utilcode.util.Utils
import com.feeyo.groundservice.base_util.FyLog
import com.feeyo.groundservice.base_util.IModuleInit

/**
 *作者：70893 on 2024-12-24
 *描述：定位基础初始化入口，相当于application
 */
open class LocationModuleInit : IModuleInit {
    private val TAG = javaClass.simpleName

    override fun onInitAhead(application: Application) {
        FyLog.e(TAG, "定位模块初始化---onInitAhead")
        initAMapDeclare()
    }

    override fun onInitDelay(application: Application) {
        FyLog.e(TAG, "定位模块初始化---onInitDelay")
    }

    //初始化高德地图声明
    private fun initAMapDeclare() {
        Utils.getApp().let {

            AMapLocationClient.updatePrivacyShow(it, true, true)

            AMapLocationClient.updatePrivacyAgree(it, true)
        }
    }

}